/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.oa.action.autooffice;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.oa.mapper.autooffice.MyacountMapper;
public class Myacount extends BaseAction
{
    @Autowired(required=false)
	private MyacountMapper mapper;
    /**
    个人配置
    */
    
    public Map myconfigure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object CMID =mapper.CMID(params);
        result.put("CMID", CMID);
        
        
        SQLList<SQLMap> l_pf=mapper.l_pf(params);
        result.put("l_pf", l_pf);
        
        
        SQLList<SQLMap> l_pt=mapper.l_pt(params);
        result.put("l_pt", l_pt);
        
        
        SQLList<SQLMap> s_person=mapper.s_person(params);
        SQLMap s_person_emt=s_person.getExistfirst();
        result.put("s_person", s_person_emt);
        
        
        SQLList<SQLMap> s_relation=mapper.s_relation(params);
        SQLMap s_relation_emt=s_relation.getExistfirst();
        result.put("s_relation", s_relation_emt);
        
        
        SQLList<SQLMap> s_email=mapper.s_email(params);
        result.put("s_email", s_email);
        
        return result;
    }
    /**
    增加邮箱信息
    */
    
    public Map mymail_insert() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        return result;
    }
    /**
    修改邮箱信息
    */
    
    public Map mymail_update() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_acc=mapper.s_acc(params);
        SQLMap s_acc_emt=s_acc.getExistfirst();
        result.put("s_acc", s_acc_emt);
        
        return result;
    }
    /**
    修改QQ邮箱信息
    */
    
    public Map myqqmail_update() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_acc=mapper.s_acc(params);
        SQLMap s_acc_emt=s_acc.getExistfirst();
        result.put("s_acc", s_acc_emt);
        
        return result;
    }
    /**
    修改授权码
    */
    
    public Map grant_update() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_acc=mapper.s_acc(params);
        SQLMap s_acc_emt=s_acc.getExistfirst();
        result.put("s_acc", s_acc_emt);
        
        return result;
    }
    /**
    修改密码
    */
    
    public Map mypassword_update() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_access=mapper.s_access(params);
        SQLMap s_access_emt=s_access.getExistfirst();
        result.put("s_access", s_access_emt);
        
        return result;
    }
    /**
    个人配置修改
    */
    
    public Map myconfigureSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.myconfigureSubmit(params);
        
        
        Object cnt_relation =
        mapper.cnt_relation(params);
        result.put("cnt_relation", cnt_relation);
        
        
        mapper.myconfigureSubmit(params);
        
        return result;
    }
    /**
    */
    
    public Map d_acc() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_acc(params);
        
        return result;
    }
    /**
    增加邮箱信息修改
    */
    
    public Map mymail_insertSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int mail_account = mapper.mail_account(params);
        result.put("mail_account", mail_account);
        
        return result;
    }
    /**
    修改邮箱信息修改
    */
    
    public Map mymail_updateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int mail_account = mapper.mail_account(params);
        result.put("mail_account", mail_account);
        
        return result;
    }
    /**
    修改QQ邮箱信息修改
    */
    
    public Map myqqmail_updateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int mail_account = mapper.mail_account(params);
        result.put("mail_account", mail_account);
        
        return result;
    }
    /**
    修改授权码修改
    */
    
    public Map grant_updateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int mail_account = mapper.mail_account(params);
        result.put("mail_account", mail_account);
        
        return result;
    }
    /**
    修改密码修改
    */
    
    public Map mypassword_updateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.put("password",SQL.md5(getParameter("password"),"123456"));
        mapper.mypassword_updateSubmit(params);
        
        
        params.def("password","123456");
        SQLList<SQLMap> s_access=mapper.s_access(params);
        SQLMap s_access_emt=s_access.getExistfirst();
        result.put("s_access", s_access_emt);
        
        
        
        return result;
    }
}